# T3
#CROSS_COMPILE=arm-linux-gnueabihf-

# RK3568
# CROSS_COMPILE=aarch64-linux-gnu-

# NUC
# CROSS_COMPILE=arm-nuvoton-linux-uclibceabi-

INCLUDES=-I./
INCLUDES+=-I./include

LIBDIR=-L./lib

CC=$(CROSS_COMPILE)gcc
TARGET=lcd

LIBS=-lpthread -lm

CFLAGS=-Wall -g -O0 -std=c99

SOURCES=$(wildcard *.c)
OBJS=$(patsubst %.c, %.o, $(SOURCES))

%.o:%.c
	$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@

$(TARGET):$(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $@ $(LIBS) $(INCLUDES) $(LIBDIR)

clean:
	rm -f $(OBJS)
	rm -f $(TARGET)
